<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <router-link to="/home">首页</router-link>
    <router-view></router-view>
</div>
<script src="node_modules/vue/dist/vue.js"></script>
<script src="node_modules/vue-router/dist/vue-router.js"></script>
<script>
    const Home = {
        template: `<h1>这是Home组件</h1>`
    };
    let router = new VueRouter({
        routes: [
            {path: '/home', component: Home}
        ]
    });
    let vm = new Vue({
        el: '#app',
        data: {},

        router: router
    })
</script>
</body>
</html>